import {createRouter,createWebHashHistory} from 'vue-router'

const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        {
            path:'/index',
            redirect:'/'
        },
        {
            path:'/',
            component:()=>import('../view/index.vue'),
            children:[
                {
                    path:'',
                    meta:{title:'首页'},
                    component:()=>import('../view/home.vue')
                },
                {
                    path:'/service',
                    meta:{title:'产品与服务'},
                    component:()=>import('../view/service.vue')
                },
                {
                    path:'/myService',
                    meta:{title:'我们的服务'},
                    component:()=>import('../view/myService.vue')
                },
                {
                    path:'/myProduct',
                    meta:{title:'我们的产品'},
                    component:()=>import('../view/myProduct.vue')
                },
                {
                    path:'/case',
                    meta:{title:'客户案例'},
                    component:()=>import('../view/case.vue')
                },
                {
                    path:'/caseDetail',
                    meta:{title:'客户案例'},
                    component:()=>import('../view/caseDetail.vue')
                },
                {
                    path:'/me',
                    meta:{title:'关于我们'},
                    component:()=>import('../view/me.vue')
                },
                {
                    path:'/news',
                    meta:{title:'新闻动态'},
                    component:()=>import('../view/news.vue')
                },
                {
                    path:'/newsDetail',
                    meta:{title:'新闻详情'},
                    component:()=>import('../view/newsDetail.vue')
                },
                {
                    path:'/contact',
                    meta:{title:'联系我们'},
                    component:()=>import('../view/contact.vue')
                },
                {
                    path:'/search',
                    meta:{title:'搜索'},
                    component:()=>import('../view/search.vue')
                }
            ]
        }
    ]
})

export default router